/*
 * @Author: 刘庆州 
 * @Date: 2022-01-08 17:11:19 
 * @Last Modified by:   刘庆州 
 * @Last Modified time: 2022-01-08 17:11:19 】
 * 
 * 提供基础配置信息
 * constants.js 提供如服务器地址、分页数量、设备类型、设备号、版本号等配置
 */


 import {Platform} from 'react-native';
 import DeviceInfo from 'react-native-device-info';
 import RNFS from 'react-native-fs';
 import {Dimensions} from 'react-native';
 import {PixelRatio} from 'react-native';

const deviceH = Dimensions.get('window').height;
const deviceW = Dimensions.get('window').width;
// downUrl: 'http://192.168.110.39',
// serverUrl: 'http://192.168.110.39:6060',
 export default {
  downUrl: 'http://10.1.8.51',
  serverUrl: 'http://10.1.8.51',
  serverPort: '6060',
   ApiURL: "/Server.svc/api/invoke",
   documentPath: (Platform.OS === 'ios' ? RNFS.DocumentDirectoryPath : RNFS.ExternalDirectoryPath),
   pageSize: 10,
   deviceType: Platform.OS.toUpperCase(),
   deviceWidth: deviceW,
   deviceHeight: deviceH,
   ratio: PixelRatio.get(),
   pixel: 1 / PixelRatio.get(),
   deviceInfo: {
     UniqueID: DeviceInfo.getUniqueId(),
     Manufacturer: DeviceInfo.getManufacturer(),
     Brand: DeviceInfo.getBrand(),
     Model: DeviceInfo.getModel(),
     DeviceId: DeviceInfo.getDeviceId(),
     SystemName: DeviceInfo.getSystemName(),
     SystemVersion: DeviceInfo.getSystemVersion(),
     BundleId: DeviceInfo.getBundleId(),
     ApplicationName: DeviceInfo.getApplicationName(),
     BuildNumber: DeviceInfo.getBuildNumber(),
     Version: DeviceInfo.getVersion(),
     ReadableVersion: DeviceInfo.getReadableVersion(),
     DeviceName: DeviceInfo.getDeviceName(),
     UserAgent: DeviceInfo.getUserAgent(),
     // DeviceLocale: DeviceInfo.getDeviceLocale(),
     // DeviceCountry: DeviceInfo.getDeviceCountry(),
     // IPAddress: DeviceInfo.getIPAddress(),
     // MACAddress: DeviceInfo.getMACAddress(),
     TotalMemory: DeviceInfo.getTotalMemory(),
     MaxMemory: DeviceInfo.getMaxMemory(),
   },
   deviceNo: DeviceInfo.getUniqueId().replace('-').substr(0, 12),
   versionName: DeviceInfo.getVersion(),
 };
 